Improve a preprocessor comment
authorPlatonides <platonides@users.mediawiki.org>
Thu, 13 Jan 2011 17:30:27 +0000 (17:30 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Thu, 13 Jan 2011 17:30:27 +0000 (17:30 +0000)
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php

index 94a75cc..45c1062 100644 (file)
@@ -316,7 +316,7 @@ class Preprocessor_DOM implements Preprocessor {
                                                // Search backwards for leading whitespace
                                                $wsStart = $i ? ( $i - strspn( $revText, ' ', strlen( $text ) - $i ) ) : 0;
                                                // Search forwards for trailing whitespace
-                                               // $wsEnd will be the position of the last space
+                                               // $wsEnd will be the position of the last space (or the '>' if there's none)
                                                $wsEnd = $endPos + 2 + strspn( $text, ' ', $endPos + 3 );
                                                // Eat the line if possible
                                                // TODO: This could theoretically be done if $wsStart == 0, i.e. for comments at
index e3951c1..f81fd04 100644 (file)
@@ -272,7 +272,7 @@ class Preprocessor_Hash implements Preprocessor {
                                                // Search backwards for leading whitespace
                                                $wsStart = $i ? ( $i - strspn( $revText, ' ', strlen( $text ) - $i ) ) : 0;
                                                // Search forwards for trailing whitespace
-                                               // $wsEnd will be the position of the last space
+                                               // $wsEnd will be the position of the last space (or the '>' if there's none)
                                                $wsEnd = $endPos + 2 + strspn( $text, ' ', $endPos + 3 );
                                                // Eat the line if possible
                                                // TODO: This could theoretically be done if $wsStart == 0, i.e. for comments at